-- GENERATED SPELL FOR [Caverndeep Reaver] --


function spell0_6211(pUnit, Event) --@Arcing Smash,n/a--
pUnit:FullCastSpellOnTarget(8374,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6211', 586, 1)
end

function spell1_6211(pUnit, Event) --@Berserker Stance,Self--
pUnit:FullCastSpellOnTarget(7366,pUnit)
pUnit:RegisterEvent('Sorts_6211', 616, 1)
end

function spell2_6211(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(845,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6211', 688, 1)
end

function Sorts_6211(pUnit, Event)
local choix_sorts_6211 = math.random(0, 2)
if choix_sorts_6211 == 0 then
pUnit:RegisterEvent('spell0_6211', 1, 1)
end
if choix_sorts_6211 == 1 then
pUnit:RegisterEvent('spell1_6211', 1, 1)
end
if choix_sorts_6211 == 2 then
pUnit:RegisterEvent('spell2_6211', 1, 1)
end
end

function mob6211_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6211', math.random(1500, 3000), 1)
end

function mob6211_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6211_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6211_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6211, 1, 'mob6211_Action')
RegisterUnitEvent(6211, 2, 'mob6211_Leave')
RegisterUnitEvent(6211, 3, 'mob6211_Kill')
RegisterUnitEvent(6211, 4, 'mob6211_Die')
